//*****************************************
//  Grade.java   Java Foundations
//
//  Demonstrates a school grade.
//*****************************************
public class Grade
{

   private String name;
   private int lowerBound;

   //---------------------------------------------------------------
   // Constructor: Sets up this Grade object with the specified
   // grade name and numeric lower bound.
   //---------------------------------------------------------------
   public Grade (String grade, int cutoff)
   {
      name = grade;
      lowerBound = cutoff;
   }

   //---------------------------------------------------
   //  Returns a string representations of this grade.
   //---------------------------------------------------
   public String toString()
   {
      return name + "\t" + lowerBound;
   }

   //-------------------------
   //  Name mutator.
   //-------------------------
   public void setName (String grade)
   {
      name = grade;
   }

   //-------------------------------
   //  Lower bound mutatpr.
   //-------------------------------
   public void setLowerBound (int cutoff)
   {
      lowerBound = cutoff;
   }
 
   //-------------------
   //  Name accessor.
   //-------------------
   public String getName()
   {
      return name;
   }

   //-------------------------
   //  Lowerbound accessor.
   //-------------------------
   public int getLowerBound()
   {
      return lowerBound;
   }
} 
